var e = require;
var t = module;
var o = exports;
Object.defineProperty(o, "__esModule", {value: !0});
var n = e("GlobalParams"),
    a = e("ModuleUI"),
    i = e("UIManager"),
    r = e("shop_role_item_node"),
    s = cc._decorator,
    l = s.ccclass,
    c = s.property,
    d = (function (e) {
        function t() {
            var t = (null !== e && e.apply(this, arguments)) || this;
            return (t.role_content_node = null), (t.role_node_item = null), t;
        }
        return (
            __extends(t, e),
            (t.prototype.initView = function () {
                this.uiManager = cc.find("UIManager").getComponent(i.default);
            }),
            (t.prototype.start = function () {
                for (var e = 0; e < n.GlobalParams.GameHeroIndex.length; e++) {
                    var t = n.GlobalParams.GameHeroIndex[e],
                        o = cc.instantiate(this.role_node_item);
                    (o.active = !0), o.getComponent(r.default).showRoleItemInfo(t), o.setParent(this.role_content_node);
                }
            }),
            (t.prototype.showRoleType = function (e) {
                this.node.getComponent(cc.ScrollView).scrollToLeft(0.1);
                for (var t = 0, o = this.role_content_node.children; t < o.length; t++)
                    o[t].getComponent(r.default).showItemType(e);
            }),
            __decorate([c(cc.Node)], t.prototype, "role_content_node", void 0),
            __decorate([c(cc.Node)], t.prototype, "role_node_item", void 0),
            __decorate([l], t)
        );
    })(a.default);
o.default = d;
